package com.ruoyi.system.domain.xs;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * TB 订单 完结表
 * @TableName xs_order_end
 */
@TableName(value ="xs_order_end")
@Data
public class XsOrderEnd extends BaseEntity {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 内部订单id
     */
    private String orderId;

    /**
     * 淘宝订单唯一ID
     */
    private String acookieId;

    /**
     * 买家id
     */
    private String buyerOpenUid;

    /**
     * 客服编号
     */
    private String serviceCode;

    /**
     * 客服名称
     */
    private String serviceName;

    /**
     * 写手id
     */
    private Integer writerId;

    /**
     * 写手昵称
     */
    private String writerNickName;

    /**
     * 写手真实姓名
     */
    private String writerName;

    /**
     * 订单状态(1未派单，2进行中，3待验收，4已完成，5是否修改/申请退款，6结单，7写手结算)
     */
    private String status;

    /**
     * 商品标题
     */
    private String title;

    /**
     * 订单金额
     */
    private BigDecimal orderMoney;

    /**
     * 付款金额
     */
    private BigDecimal payment;

    /**
     * 付款时间
     */
    private Date payTime;

    /**
     * 交易结束时间
     */
    private Date endTime;

    /**
     * 	交易修改时间(用户对订单的任何修改都会更新此字段)。
     */
    private Date modified;

    /**
     * 实收价
     */
    private BigDecimal actualPayment;

    /**
     * 备注内容
     */
    private String sellerMemo;

    /**
     * 账户
     */
    private String account;

    /**
     * 是否报账（1报，2未报）
     */
    private String checkSheet;

    /**
     * 结款日期
     */
    private Date settlementDate;

    /**
     * 结款备注
     */
    private String settlementRemark;

    /**
     * 图片/文档
     */
    private String picOrDic;

    /**
     * 绩效月份
     */
    private String performance;

    /**
     * 订单类型
     */
    private Integer orderType;

    /**
     * 客户已付定价金额
     */
    private String clientPaidPrice;

    /**
     * 写手已结金额
     */
    private String writerPaidPrice;

    /**
     * 订单来源（1淘宝、2天猫、3微信、4抖音、5拼多多、6对公、7线下、8内部、9其他渠道）
     */
    private String orderSource;

    /**
     * 订单排名
     */
    private String oRank;

    /**
     * 退款
     */
    private String refund;

    /**
     * 是否刷单
     */
    private String ifBrushing;

    /**
     * 门店编号
     */
    private String storeCode;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        XsOrderEnd other = (XsOrderEnd) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getAcookieId() == null ? other.getAcookieId() == null : this.getAcookieId().equals(other.getAcookieId()))
            && (this.getBuyerOpenUid() == null ? other.getBuyerOpenUid() == null : this.getBuyerOpenUid().equals(other.getBuyerOpenUid()))
            && (this.getServiceCode() == null ? other.getServiceCode() == null : this.getServiceCode().equals(other.getServiceCode()))
            && (this.getServiceName() == null ? other.getServiceName() == null : this.getServiceName().equals(other.getServiceName()))
            && (this.getWriterId() == null ? other.getWriterId() == null : this.getWriterId().equals(other.getWriterId()))
            && (this.getWriterNickName() == null ? other.getWriterNickName() == null : this.getWriterNickName().equals(other.getWriterNickName()))
            && (this.getWriterName() == null ? other.getWriterName() == null : this.getWriterName().equals(other.getWriterName()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getOrderMoney() == null ? other.getOrderMoney() == null : this.getOrderMoney().equals(other.getOrderMoney()))
            && (this.getPayment() == null ? other.getPayment() == null : this.getPayment().equals(other.getPayment()))
            && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
            && (this.getActualPayment() == null ? other.getActualPayment() == null : this.getActualPayment().equals(other.getActualPayment()))
            && (this.getSellerMemo() == null ? other.getSellerMemo() == null : this.getSellerMemo().equals(other.getSellerMemo()))
            && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
            && (this.getCheckSheet() == null ? other.getCheckSheet() == null : this.getCheckSheet().equals(other.getCheckSheet()))
            && (this.getSettlementDate() == null ? other.getSettlementDate() == null : this.getSettlementDate().equals(other.getSettlementDate()))
            && (this.getSettlementRemark() == null ? other.getSettlementRemark() == null : this.getSettlementRemark().equals(other.getSettlementRemark()))
            && (this.getPicOrDic() == null ? other.getPicOrDic() == null : this.getPicOrDic().equals(other.getPicOrDic()))
            && (this.getPerformance() == null ? other.getPerformance() == null : this.getPerformance().equals(other.getPerformance()))
            && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
            && (this.getOrderSource() == null ? other.getOrderSource() == null : this.getOrderSource().equals(other.getOrderSource()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getORank() == null ? other.getORank() == null : this.getORank().equals(other.getORank()))
            && (this.getRefund() == null ? other.getRefund() == null : this.getRefund().equals(other.getRefund()))
            && (this.getIfBrushing() == null ? other.getIfBrushing() == null : this.getIfBrushing().equals(other.getIfBrushing()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getAcookieId() == null) ? 0 : getAcookieId().hashCode());
        result = prime * result + ((getBuyerOpenUid() == null) ? 0 : getBuyerOpenUid().hashCode());
        result = prime * result + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode());
        result = prime * result + ((getServiceName() == null) ? 0 : getServiceName().hashCode());
        result = prime * result + ((getWriterId() == null) ? 0 : getWriterId().hashCode());
        result = prime * result + ((getWriterNickName() == null) ? 0 : getWriterNickName().hashCode());
        result = prime * result + ((getWriterName() == null) ? 0 : getWriterName().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getOrderMoney() == null) ? 0 : getOrderMoney().hashCode());
        result = prime * result + ((getPayment() == null) ? 0 : getPayment().hashCode());
        result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
        result = prime * result + ((getActualPayment() == null) ? 0 : getActualPayment().hashCode());
        result = prime * result + ((getSellerMemo() == null) ? 0 : getSellerMemo().hashCode());
        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
        result = prime * result + ((getCheckSheet() == null) ? 0 : getCheckSheet().hashCode());
        result = prime * result + ((getSettlementDate() == null) ? 0 : getSettlementDate().hashCode());
        result = prime * result + ((getSettlementRemark() == null) ? 0 : getSettlementRemark().hashCode());
        result = prime * result + ((getPicOrDic() == null) ? 0 : getPicOrDic().hashCode());
        result = prime * result + ((getPerformance() == null) ? 0 : getPerformance().hashCode());
        result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
        result = prime * result + ((getOrderSource() == null) ? 0 : getOrderSource().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getORank() == null) ? 0 : getORank().hashCode());
        result = prime * result + ((getRefund() == null) ? 0 : getRefund().hashCode());
        result = prime * result + ((getIfBrushing() == null) ? 0 : getIfBrushing().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", acookieId=").append(acookieId);
        sb.append(", buyerOpenUid=").append(buyerOpenUid);
        sb.append(", serviceCode=").append(serviceCode);
        sb.append(", serviceName=").append(serviceName);
        sb.append(", writerId=").append(writerId);
        sb.append(", writerNickName=").append(writerNickName);
        sb.append(", writerName=").append(writerName);
        sb.append(", status=").append(status);
        sb.append(", title=").append(title);
        sb.append(", orderMoney=").append(orderMoney);
        sb.append(", payment=").append(payment);
        sb.append(", payTime=").append(payTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", modified=").append(modified);
        sb.append(", actualPayment=").append(actualPayment);
        sb.append(", sellerMemo=").append(sellerMemo);
        sb.append(", account=").append(account);
        sb.append(", checkSheet=").append(checkSheet);
        sb.append(", settlementDate=").append(settlementDate);
        sb.append(", settlementRemark=").append(settlementRemark);
        sb.append(", picOrDic=").append(picOrDic);
        sb.append(", performance=").append(performance);
        sb.append(", orderType=").append(orderType);
        sb.append(", orderSource=").append(orderSource);
        sb.append(", oRank=").append(oRank);
        sb.append(", refund=").append(refund);
        sb.append(", ifBrushing=").append(ifBrushing);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}